import React from "react";
import {View, Text} from "@tarojs/components";
import "./index.scss"

const PageBottom: React.FC<{
    onCancel: () => void;
    onConfirm: () => void;
    cancelText?: string;
    confirmText?: string;
}> = ({
          onCancel,
          onConfirm,
          cancelText,
          confirmText,
      }) => {
    return (
        <View className="page-bottom flex-column flex-item card-background">
            <View className="half-line"></View>
            <View className="comment-input-container flex-row flex-item">
                <View className="flex1"></View>
                <View onClick={onCancel} className="btn preview-btn flex-row flex-center">
                    <Text className="data-val font-size24">{ cancelText || '取消'}</Text>
                </View>
                <View className="flex1"></View>
                <View onClick={onConfirm} className="btn save-btn flex-row flex-center">
                    <Text className="data-val font-size24">{confirmText || '确定'}</Text>
                </View>
                <View className="flex1"></View>
            </View>
        </View>
    )
}
export default PageBottom